<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组件化</title>
        <script src="../vue.js"></script>
</head>
<body>
<div id="box">
    <hao content="hello world" age="13">
    </hao>
</div>

<!--var myComponent = Vue.component('my-component', {
props : ['title', 'content'],
template : '<h1>{{title}}</h1><p>{{content}}</p>'
})-->
<script type="text/javascript">
    var Message = Vue.extend({
        props : ['content','age'],
        template : '<h1>{{content}}</h1>' +
            '<br><h1>{{age}}</h1>'
    })
    Vue.component("hao",Message);
    var vm = new Vue({
        el:'#box',
    })
</script>




</body>
</html>